All right.
Welcome to introduction to machine learning, to exercise five.
Today we will take a look at exercise two, so the exercise that you have to implement
now.
You have a lot to do.
It's not that much, actually, but three tasks, more or less, and, yeah, without further ado,
let's start.
So we more or less discussed the tasks in one of the exercises already, what you have
to do, but still to reiterate everything, I will work with my slides again to show everything
to you.
All right.
So at first we have to do a Gaussian kernel.
That's the first task.
And then we have to do a slow convolution.
So we have to convolve our image with our Gaussian kernel to blur it.
Why do we do that?
Well, we want to create a certain type of image, like a difference image.
And how can we do that?
Well, to do that, we take our original image and we blur it.
Then we create our difference image by subtracting our new image from our input image.
And then we add this distance image that we received to our original image again.
And we clip everything to lie between 0 and 255.
And that gives us a sharpened image, more or less, to some degree, at least.
It doesn't work in every case.
Just to give you an idea how it could look like, this is the blurred output image and
this is the sharpened image.
You see, it's not perfect.
We have artifacts in the background.
It's suddenly very bright here.
But still, this approach is a very easy, trivial way to sharpen our blurred image in the beginning,
or our image that was initially blurred.
All right, let's try to remember how everything works.
Here we have a convolution, a 2D convolution.
For the convolution, we have our kernel, k, our input image, i, and we convolve it.
This is denoted with the star here.
Oops, I'm sorry about that.
And yeah, we have this convolution.
And what do we even compute here?
Well, we overlap our kernel with our image.
And for each overlapping, well, section, like here we have the 1 and here we have the 1,
here we have 0, here we have 0.
We just multiply the values with each other.
Here in blue, very small, you can see our kernel values.
And here we can then compute 1 times 1 equals 1, 0 times 0 is 0, 0 times 1 is 0.
And yeah, here we again have a 1 times 1 equals 1, and so on.
So this is for binary cases.
Obviously, this is not the case for our exercise, but it works exactly the same, really.
Just multiply one value by the other.
Okay.
And once we've done that, then we can get our output.
Presenters
Zugänglich über
Offener Zugang
Dauer
00:32:31 Min
Aufnahmedatum
2025-06-12
Hochgeladen am
2025-06-12 16:06:05
Sprache
en-US
Short overview over exercise 2 - more details are given in last week's exercise